<?php
require_once '../sub/init.php';
if(!is_mobile())header("Location: my_vip.php");
$currfields = "sex,grade,sjtime,sjtime2,photo_s";
require_once ZEAI.'m/my_chk_u.php';
require_once ZEAI.'cache/config_vip.php';
$cook_grade  = intval($row['grade']);if($cook_grade>1)zeai_chk_ugrade(intval($cook_uid));
$cook_sex    = $row['sex'];
$cook_sjtime = $row['sjtime'];
$cook_sjtime2= $row['sjtime2'];
$cook_photo_s= $row['photo_s'];
$photo_s_url = (!empty($cook_photo_s))?UP.$cook_photo_s:RES.'photo_m'.$cook_sex.'.png';
$kf_tel=dataIO($_ZEAI['kf_tel'],'out');$kf_mob=dataIO($_ZEAI['kf_mob'],'out');$kf_wxpic=dataIO($_ZEAI['kf_wxpic'],'out');
$nav='my';?>
<!doctype html><html><head><meta charset="utf-8">
<title>我的VIP-<?php echo $_ZEAI['siteName'];?></title>
<?php echo HEADMETA; ?>
<link href="<?php echo RES;?>m/css/m.css?<?php echo $_ZEAI['cache_str'];?>" rel="stylesheet" type="text/css" />
<link href="<?php echo HOST;?>/cache/zeaicolor.css?<?php echo $_ZEAI['cache_str'];?>" rel="stylesheet" type="text/css" />
<script src="<?php echo RES;?>www_zeai_cn.js?<?php echo $_ZEAI['cache_str'];?>"></script>
<script src="<?php echo RES;?>m/js/m.js?<?php echo $_ZEAI['cache_str'];?>"></script>
<script src="<?php echo RES;?>m/js/my_vip.js?<?php echo $_ZEAI['cache_str'];?>"></script>
<style>
.top_mini4{background-color:<?php echo $_ZEAI['mob_mbcolor'];?>}
.shop_vip {margin:7rem auto 15rem auto;border-radius:1.2rem;background-color:#fff;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;min-height:10rem;font-size:1.4rem}
.shop_vip .table{width:95%;border-collapse:collapse;box-sizing:border-box;background-color:#fff;border-radius:1.2rem;margin:0 auto}
.shop_vip .table td{padding:1.5rem 0;border-bottom: #f2f2f2 1px solid}
.shop_vip .table td b{font-size:1.6rem}
.shop_vip .table:last-child tr td{border-bottom:0}
.shop_vip .table em{font-size:1.3rem;display:block}
.shop_vip .table tr td.on{color:#F7564D}
.shop_vip .table tr td.off {color:#999}
.shop_vip .table tr td.vippricebox{font-size:2.1rem;font-weight:bold;font-family:Arial}
.shop_vip button{width:88%;display:block;margin:2rem auto}
.shop_vip .checkskin-label i.i3{border-radius:3rem}
.shop_vip .table img.gico{width:5rem}
.shop_vip .norole h4{font-size:1.6rem}
.viplist{width:90%;margin:0 auto;padding-bottom:1rem;box-shadow: 0 0 2.8rem rgb(0 0 0 / 8%);border-radius:1.6rem;margin-top:2rem}
.viplist h1{width:90%;margin:0 auto;color:#333;font-size:1.6rem;font-weight:bold;text-align:center;position:relative;padding-top:2rem}
.viplist .CC{padding:1rem 2rem 1.5rem 2rem;line-height:200%;color:#666}
.viplist .CC b{color:#FD66B5;font-weight:normal}
.viplist #vipC{text-align:left}
.viplist .auth dl{width:50%;float:left;text-align:center;margin:1rem 0 0 0}
.viplist .auth dl dt{width:6rem;height:6rem;line-height:6rem;border-radius:4.2rem;background-color:#E7D3B8;color:#fff;text-align:center;display:inline-block;margin-bottom:1rem;border:#ddc9ae 1px solid}
.viplist .auth dl dd{width:100%;line-height:2.4rem;display:inline-block;font-size:1.3rem;color:#666}
.viplist .auth dl dt i.ico{font-size:3.2rem;}
.viplist .auth dl dd h6{display:block;font-size:1.3rem;color:#666;}
.viplist .auth dl dd h6 b{color:#F7564D;margin:0 .3rem;font-weight:normal}
.viplist img.loading{display:block;margin:4rem auto;width:3rem}
.shop_btm_kefu{margin-top:5rem}
.shop_btm_kefu img{width:25%;margin:1rem auto;display:block;padding:.5rem;border:#eee 1px solid}
.shop_btm_kefu font{color:#999}
.shop_btm_kefu a{margin-top:1rem;display:block;color:#666}
.shop_btm_kefu .ico{margin-right:.4rem}
.shop_my_vip_self{text-align:center;line-height:200%;padding:2rem 0;background-color:#fff}
.shop_my_vip_self .logobox{width:8rem;height:8rem;border-radius:4rem;overflow:hidden;margin:0 auto 2rem auto}
.shop_my_vip_self .logobox img.logo{width:8rem;height:8rem;object-fit:cover;-webkit-object-fit:cover}
.shop_my_vip_self h5{color:#999}
.shop_my_vip_selfNO{padding:4rem 0;line-height:150%}
.shop_my_vip_selfNO button{box-shadow:0 .3rem .8rem rgba(<?php echo c16_rgb($_ZEAI['mob_mbcolor']);?>,.4);width:60%;margin-top:4rem}
</style>
</head><body>
<?php
$mini_class='top_mini4 bgcolor yunbox';
$mini_title='我的VIP';
require_once ZEAI.'m/top_mini.php';?>
<div class="shop_vip">
	<?php
    if($cook_grade>1){?>
        <div class="shop_my_vip_self">
            <div class="logobox"><img src="<?php echo $photo_s_url;?>" class="logo"></div>
            <h4>您当前级别【<?php echo uicon($cook_sex.$cook_grade);?><?php echo utitle($cook_grade);?>】</h4>
            <h5><?php echo YmdHis($cook_sjtime,'Ymd');?> ~ <?php echo YmdHis($cook_sjtime2,'Ymd');?></h5>
        </div>
        <div class="viplist">
            <h1><font><?php echo utitle($cook_grade);?>特权</font></h1>
            <div class="CC auth">
                <ul id="vipauth"></ul>
                <div class="clear"></div>
            </div>
        </div>
        <div class="viplist" id="vipCbox">
            <h1><font id="gradename2"><?php echo utitle($cook_grade);?>套餐详情</font></h1>
            <div class="CC" id="vipC"><img src="<?php echo RES;?>loading.gif" class="loading"></div>
        </div>
        <script>
		function getvipauth(grade){
			zeai.ajax({url:HOST+'/m/my_vip'+zeai.extname,data:{submitok:'ajax_getvipauth',grade:grade}},function(e){rs=zeai.jsoneval(e);
				if(rs.flag==1){vipauth.html(rs.C);
				if(zeai.empty(rs.vipC)){
					vipCbox.hide();
				}else{
					vipCbox.show();vipC.html(html_decode(rs.vipC));
				}
				}
			});
		}
		setTimeout(function(){getvipauth(<?php echo $cook_grade;?>);},400);
        </script>
    <?php }else{?>
    	<div class="shop_my_vip_selfNO">
            您还没有激活开通VIP服务<br>请点击下方按钮立即开通
            <button type="button" class="btn size4 zeaibg yuan ico" onClick="zeai.openurl('my_vip.php')">&#xe611; 立即开通VIP</button>
        </div>
    <?php }?>
    <div class="shop_btm_kefu">
        <?php if (!empty($kf_wxpic) ){?><img src="<?php echo UP.$kf_wxpic;?>"><font>长按二维码加客服微信</font><br><?php }?>
        <?php if (!empty($kf_tel)){?>
            <a href="tel:<?php echo $kf_tel;?>" class="C999"><i class="ico">&#xe7c1;</i><?php echo $kf_tel;?></a><br>
        <?php }else{?>
            <?php if (!empty($kf_mob)){?><i class="ico">&#xe7c1;</i><a href="tel:<?php echo $kf_mob;?>" class="C999"><?php echo $kf_mob;?></a><?php }?>
        <?php }?>
    </div>        
</div>
<?php 
require_once ZEAI.'m/TRnav.php';?>
<div class="blank"></div></body></html>